﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using Save_Editor.Windows;
using Oroboros;
using Oroboros.Objects;
using Oroboros.Save_Data;

namespace Save_Editor.Controls
{
    /// <summary>
    /// Interaction logic for ctrlHumanManager.xaml
    /// </summary>
    public partial class ctrlHumanManager : UserControl
    {
        public winHumanSaveData hsd;
        public ctrlHumanManager()
        {
            InitializeComponent();
        }

        private void Button_Click(object sender, RoutedEventArgs e)
        {
            if (comboBox1.SelectedIndex == -1) return;
            if (hsd == null)
            {
                hsd = new winHumanSaveData();
                hsd.Closed += new EventHandler(hsd_Closed);
            }
            hsd.DataContext = (HumanSaveData)comboBox1.SelectedItem;
            hsd.Show();
        }

        void hsd_Closed(object sender, EventArgs e)
        {
            hsd = null;
        }
    }
}
